package com.liuyi.netty.im.lychat.modular.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.liuyi.netty.im.lychat.modular.enums.GroupRole;
import com.liuyi.netty.im.lychat.modular.enums.MessageReminding;
import com.liuyi.rapid.develop.mybatis.plus.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Transient;

/**
 * <p>
 * 群组成员表
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-12-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_group_member")
@ApiModel(value = "GroupMember对象", description = "群组成员表")
public class GroupMember extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "逻辑删除，1未删除，时间戳删除")
    private Long del;

    @ApiModelProperty(value = "群号")
    private String groupNo;

    @ApiModelProperty(value = "成员")
    private String userId;

    @ApiModelProperty(value = "角色")
    private GroupRole groupRole;

    @ApiModelProperty(value = "群昵称")
    private String groupNick;

    @ApiModelProperty(value = "消息提醒")
    private MessageReminding messageReminding;

    @ApiModelProperty(value = "个人头像")
    @Transient
    @TableField(exist = false)
    private String userHead;

    @ApiModelProperty(value = "群名")
    @Transient
    @TableField(exist = false)
    private String groupName;

    @ApiModelProperty(value = "群头像")
    @Transient
    @TableField(exist = false)
    private String groupHead;

    @ApiModelProperty(value = "群头像")
    @Transient
    @TableField(exist = false)
    private String sessionId;

    public static final String ID = "id";

    public static final String DEL = "del";

    public static final String GROUP_NO = "group_no";

    public static final String USER_ID = "user_id";

    public static final String GROUP_ROLE = "group_role";

    public static final String GROUP_NICK = "group_nick";

    public static final String MESSAGE_REMINDING = "message_reminding";

}
